<?PHP
	include_once "UserControl.php";
	
	$label_name = mysql_real_escape_string($_POST["name"]);
	$label_cpf = mysql_real_escape_string($_POST["cpf"]);
	$label_sex = $_POST["select"];
	$label_telephone = mysql_real_escape_string($_POST["phone"]);
	$label_celular = mysql_real_escape_string($_POST["cel"]);
	$label_email = mysql_real_escape_string($_POST["mail"]);
	$label_password = mysql_real_escape_string($_POST["password"]);
	$label_confirmPassword = mysql_real_escape_string($_POST["confirm"]);
	$label_cep = mysql_real_escape_string($_POST["cep"]);
	$label_login = mysql_real_escape_string($_POST["login"]);
	$label_state = $_POST["state"];
	$label_city = $_POST["city"];
	$label_adress = mysql_real_escape_string($_POST["address"]);
	$label_complement = mysql_real_escape_string($_POST["complement"]);
	$label_district =  mysql_real_escape_string($_POST["neighboor"]);
	$label_country =  mysql_real_escape_string($_POST["country"]);
	$label_data = mysql_real_escape_string($_POST["birthday"]);
	
	$result = UserControl::cadastreClient($label_name, $label_login, $label_cpf, $label_sex, $label_telephone, $label_celular, 
		$label_email, $label_password, $label_confirmPassword, $label_cep, $label_state, $label_city, 
		$label_adress, $label_complement, $label_district, $label_country, $label_data);
	
	if($result)
	{
		header ("Location: index.php?user_form_success=true");
	}
	else
	{
        header ("Location: cadastroCliente.php?user_form_success=false");
	}
?>